﻿using Ext.Net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace AppGisena
{
    public partial class Inicio : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        [DirectMethod]
        public void Seleccionado(String Men_Select)
        {



            if (Men_Select == "Registrar Unidad Productiva")
            {

                this.TabPrinc.ActiveIndex = 1;
                this.AreaTrab.Title = Men_Select;
                this.AreaTrab.Loader.SuspendScripting();
                this.AreaTrab.Loader.Url = "Presentacion/Up/RegistroUP/RegistroUP.aspx";
                this.AreaTrab.Loader.Mode = LoadMode.Html;
                this.AreaTrab.Loader.DisableCaching = true;
                this.AreaTrab.LoadContent();
            }


            if (Men_Select == "Vincular Asesores")
            {
                this.TabPrinc.ActiveIndex = 1;
                this.AreaTrab.Title = Men_Select;
                this.AreaTrab.Loader.SuspendScripting();
                this.AreaTrab.Loader.Url.DefaultIfEmpty();
                this.AreaTrab.Loader.Url = "Presentacion/Up/RegAsesores.aspx";
                this.AreaTrab.Loader.Mode = LoadMode.Html;
                this.AreaTrab.Loader.DisableCaching = true;
                this.AreaTrab.LoadContent();
            }

            if (Men_Select == "Vincular Socios")
            {
                this.TabPrinc.ActiveIndex = 1;
                this.AreaTrab.Title = Men_Select;
                this.AreaTrab.Loader.SuspendScripting();
                this.AreaTrab.Loader.Url.DefaultIfEmpty();
                this.AreaTrab.Loader.Url = "Presentacion/Up/Socios.aspx";
                this.AreaTrab.Loader.Mode = LoadMode.Html;
                this.AreaTrab.Loader.DisableCaching = true;
                this.AreaTrab.LoadContent();
            }


            if (Men_Select == "Agregar Productos")
            {
                this.TabPrinc.ActiveIndex = 1;
                this.AreaTrab.Title = Men_Select;
                this.AreaTrab.Loader.SuspendScripting();
                this.AreaTrab.Loader.Url.DefaultIfEmpty();
                this.AreaTrab.Loader.Url = "Presentacion/Up/RegProductoUp.aspx";
                this.AreaTrab.Loader.Mode = LoadMode.Html;
                this.AreaTrab.Loader.DisableCaching = true;
                this.AreaTrab.LoadContent();
            }


            if (Men_Select == "Georeferenciar Unidad Productiva")
            {
                this.TabPrinc.ActiveIndex = 1;
                this.AreaTrab.Title = Men_Select;
                this.AreaTrab.Loader.SuspendScripting();
                this.AreaTrab.Loader.Url.DefaultIfEmpty();
                this.AreaTrab.Loader.Url = "Presentacion/Up/GeoreferenciarUp.aspx";
                this.AreaTrab.Loader.Mode = LoadMode.Html;
                this.AreaTrab.Loader.DisableCaching = true;
                this.AreaTrab.LoadContent();
            }


            if (Men_Select == "Registrar Produccion")
            {
                this.TabPrinc.ActiveIndex = 1;
                this.AreaTrab.Title = Men_Select;
                this.AreaTrab.Loader.SuspendScripting();
                this.AreaTrab.Loader.Url.DefaultIfEmpty();
                this.AreaTrab.Loader.Url = "Presentacion/ProduccionUP/RegistrarProduccion.aspx";
                this.AreaTrab.Loader.Mode = LoadMode.Html;
                this.AreaTrab.Loader.DisableCaching = true;
                this.AreaTrab.LoadContent();
            }


            if (Men_Select == "Registrar Fortalecimiento")
            {
                this.TabPrinc.ActiveIndex = 1;
                this.AreaTrab.Title = Men_Select;
                this.AreaTrab.Loader.SuspendScripting();
                this.AreaTrab.Loader.Url.DefaultIfEmpty();
                this.AreaTrab.Loader.Url = "Presentacion/ProduccionUP/RegistrarFortalecimiento.aspx";
                this.AreaTrab.Loader.Mode = LoadMode.Html;
                this.AreaTrab.Loader.DisableCaching = true;
                this.AreaTrab.LoadContent();
            }







        }





        [DirectMethod]
        public void CaragarPaginaMapa()
        {
            this.TabPrinc.ActiveIndex = 0;
            this.mapa.Loader.SuspendScripting();
            this.mapa.Loader.Url = "http://localhost:3411/webmaping/viewer/Mapa";
            this.mapa.Loader.Mode = LoadMode.Html;
            this.mapa.Loader.DisableCaching = true;
            this.mapa.LoadContent();

        }





    }
}